<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      //1、向下取整
      //1、parseInt
      // var a = 1.9
      // console.log(parseInt(a));
      //2、Math.floor  向下取整
      // var a = 1.9
      // console.log(Math.floor(a));
      //3、四舍五入 Math.round()
      var a = 1.4
      console.log(Math.round(a))
      //4、向上取整
      //Math.ceil()
      var a = 1.1
      console.log(Math.ceil(a))
    </script>
  </body>
</html>
